builder.html {
    blogLayout.head() {text ->
        title("${text} ${post.title}")
    }

    blogLayout.body(tags, blogConfig) {
        gp.authenticated {
            gp.anchor(controller:"post", action:"edit", id:"${post.urlTitle}") {
                "Edit post"
            }
            gp.unpublished (post) {
                gp.anchor(controller:"post", action:"publish", id:"${post.id}") {
                    "Publish"
                }
            }
            gp.published (post) {
                gp.anchor(controller:"post", action:"unpublish", id:"${post.id}") {
                    "Hide"
                }
            }
        }
        h2(post.title)
        p('class':"teaser", post.teaser)
        div {
            gp.renderText(post.content)
        }
        gp.anchor(controller:"comment", action:"edit", params:"[postId:${post.id}]"){"Leave a comment"}
        post.comments.each { comment ->
            div('class':"comment") {
                p() {gp.renderText(comment.comment)}
                p("Made by ${comment.who.name} ${gp.formatDate("dd-MMM-yyyy", comment.dateCreated)}")
            }
        }
    }
}